# coding=utf-8
keyMap = {}
keyMap['users'] = '用户列表'
keyMap['account_period'] = '账期'
keyMap['address'] = '地址'
keyMap['address_change_list'] = '地址变动列表'
keyMap['address_detail'] = '详细地址'
keyMap['addresses'] = '地址列表'
keyMap['advance_money'] = '已支付金额'
keyMap['aftersales'] = '售后单详情'
keyMap['aftersales_id'] = '售后单号'
keyMap['aftersales_packages'] = '售后单包件'
keyMap['aftersales_searches'] = '售后单搜索'
keyMap['amount'] = '金额'
keyMap['apply_fee'] = '申请退款总金额'
keyMap['apply_num'] = '申请数量'
keyMap['area_sales_tops'] = '销售TOP商品'
keyMap['audit_status'] = '审核状态'
keyMap['author'] = '作者'
keyMap['author_introduce'] = '作者简介'
keyMap['available'] = '是否可用'
keyMap['balance'] = '余额'
keyMap['bank'] = '开户行'
keyMap['bank_account_code'] = '银行账户'
keyMap['barcode'] = '条形码'
keyMap['basic_change_list'] = '基础信息变动列表'
keyMap['big_area'] = '大区'
keyMap['bill'] = '批次号'
keyMap['bills'] = '账目明细'
keyMap['binding'] = '装帧'
keyMap['catalog'] = '目录'
keyMap['change_shop_items'] = '变动店铺商品'
keyMap['change_time'] = '变动时间'
keyMap['change_type'] = '变动类型'
keyMap['city'] = '市'
keyMap['city_name'] = '城市'
keyMap['clc'] = '中图法'
keyMap['company_type'] = '公司性质'
keyMap['complex_type'] = '套装类型'
keyMap['consignee'] = '姓名'
keyMap['content_introduce'] = '内容简介'
keyMap['cooperation_strategy'] = '合作策略'
keyMap['cooperation_type'] = '合作类型'
keyMap['cooperation_validity'] = '合同有效期'
keyMap['coordination_user_addresses'] = '收货地址'
keyMap['country'] = '国家代码'
keyMap['country_name'] = '国家'
keyMap['create_time'] = '创建时间'
keyMap['credit_guarantee'] = '授信方式'
keyMap['creditline_yunhan'] = '信用额度'
keyMap['current_page'] = '当前页码'
keyMap['customer_business_terms'] = '商务条件'
keyMap['customer_id'] = '客户ID'
keyMap['customer_linkmans'] = '联系人'
keyMap['customer_manager'] = '客户经理'
keyMap['customer_name'] = '客户名称'
keyMap['customer_rule'] = '客户规则'
keyMap['dc'] = '发货仓'
keyMap['dc_stocks'] = '分仓库存'
keyMap['dead_line'] = '最迟付款日'
keyMap['deal_quantity'] = '实收册数'
keyMap['declare_price'] = '申报价格'
keyMap['delivery_code'] = '运单号code'
keyMap['delivery_codes'] = '运单号列表'
keyMap['delivery_company'] = '退货承运商'
keyMap['delivery_company_id'] = '物流id'
keyMap['delivery_company_name'] = '物流名称'
keyMap['delivery_fee'] = '运费'
keyMap['delivery_list_price'] = '发货码洋'
keyMap['delivery_quantity'] = '发货数量'
keyMap['delivery_sale_price'] = '发货实洋'
keyMap['delivery_time'] = '出库时间'
keyMap['delivery_type'] = '配送类型'
keyMap['description'] = '商品描述'
keyMap['digest'] = '摘要'
keyMap['direct_supply'] = '是否直供'
keyMap['discount'] = '码洋折扣'
keyMap['discount_rule'] = '折扣规则'
keyMap['district'] = '区号'
keyMap['district_name'] = '区名'
keyMap['down_quantity'] = '下传数量'
keyMap['down_sap_date'] = '下传sap时间'
keyMap['edition'] = '版次'
keyMap['editor_recommendation'] = '主编推荐'
keyMap['effect_date'] = '开展业务时间'
keyMap['email'] = '邮箱地址'
keyMap['err_msg'] = '错误描述'
keyMap['error_message'] = '错误信息'
keyMap['externalSettleRequisitions'] = '查询列表'
keyMap['failed'] = '更新失败数量'
keyMap['failed_reason'] = '创建失败原因'
keyMap['failedReason'] = '取消失败原因'
keyMap['fix_settt_money'] = '固定结算金额'
keyMap['freight'] = '运费值'
keyMap['freight_free'] = '是否免运费'
keyMap['holder'] = '承担方'
keyMap['id'] = '区域id'
keyMap['image_type'] = '图片类型'
keyMap['impression'] = '印次'
keyMap['in_qq_group'] = '是否加入QQ群'
keyMap['in_wechat_group'] = '是否加入微信群'
keyMap['index'] = '图片展示顺序'
keyMap['isbn'] = 'ISBN号'
keyMap['item_id'] = '商品ID'
keyMap['label'] = '发货清单标签'
keyMap['left_split_batch'] = '剩余拆单次数'
keyMap['list_price'] = '码洋'
keyMap['logistics_companies'] = '物流公司信息'
keyMap['logistics_company_id'] = '承运商编号'
keyMap['logistics_company_name'] = '承运商名称'
keyMap['manage_feature'] = '经营特色'
keyMap['max_delivery_time'] = '最迟发货时间'
keyMap['max_discount'] = '允许的最大折扣'
keyMap['max_pay_time'] = '最大支付时间'
keyMap['media_comment'] = '媒体评论'
keyMap['min_discount'] = '允许的最小折扣'
keyMap['mobile'] = '手机号码'
keyMap['name'] = '名称'
keyMap['need_sales_data'] = '是否需对接销售数据'
keyMap['nick_name'] = '昵称'
keyMap['oc_code'] = '营销分类code'
keyMap['oc_name'] = '营销分类name'
keyMap['on_shelf'] = '上下架状态'
keyMap['operate_categories'] = '营销分类列表'
keyMap['order'] = '订单信息'
keyMap['order_id'] = '订单号'
keyMap['orders'] = '拆分订单号'
keyMap['other_change_list'] = '其它信息变动列表'
keyMap['out_item_id'] = '外部商品编码'
keyMap['outer_aftersales'] = '外部售后单号'
keyMap['outer_id'] = '外部交易号id'
keyMap['outer_item'] = '商品唯一标识'
keyMap['outer_order'] = '外部订单号'
keyMap['outer_trade'] = '外部交易号'
keyMap['package_code'] = '包裹号'
keyMap['package_id'] = '包件ID'
keyMap['package_items'] = '包裹明细'
keyMap['package_quantity'] = '包裹数量'
keyMap['package_total_quantity'] = '包件书本总量'
keyMap['packages'] = '包裹信息'
keyMap['packge_count'] = '包件数量'
keyMap['packge_weight'] = '包裹重量'
keyMap['page_num'] = '页数'
keyMap['parent'] = '父分类'
keyMap['parent_code'] = '父分类编码'
keyMap['parent_id'] = '父分类id'
keyMap['payment_ratio'] = '付款比例'
keyMap['phone'] = '电话号码'
keyMap['preface'] = '精彩内容'
keyMap['presell'] = '是否预售'
keyMap['presell_time'] = '预售结束时间'
keyMap['printing_date'] = '印刷时间'
keyMap['product_sale'] = '商品编码'
keyMap['product_type'] = '产品类型'
keyMap['province'] = '省代码'
keyMap['province_name'] = '省'
keyMap['publish_date'] = '出版日期'
keyMap['publish_house'] = '出版社'
keyMap['purchase_item_id'] = '采购编码'
keyMap['purchase_quantity'] = '下单数量'
keyMap['purchase_time'] = '下单时间'
keyMap['qq'] = '联系人qq'
keyMap['quantity'] = '随单册数'
keyMap['query_time'] = '查询截止时间'
keyMap['real_name'] = '客户全称'
keyMap['real_quantity'] = '运单实收包裹数'
keyMap['really_fee'] = '实际退款总金额'
keyMap['reason'] = '更新失败原因'
keyMap['receive_num'] = '商品退货数量'
keyMap['receiving_on_platform'] = '是否平台收货'
keyMap['refund_time'] = '退款时间'
keyMap['register_time'] = '注册时间'
keyMap['relate_id'] = '随包号'
keyMap['remark'] = '备注留言'
keyMap['requidpay_money'] = '代收款'
keyMap['responsible'] = '责任方'
keyMap['return_flag'] = '退货标识'
keyMap['return_rate'] = '退货比例'
keyMap['sale_price'] = '下单总实洋'
keyMap['sale_scale'] = '销售规模'
keyMap['sales_customer_id'] = '客户编码'
keyMap['sap_id'] = 'sap编码'
keyMap['save_money'] = '订单总优惠'
keyMap['sc_code'] = '店铺分类code'
keyMap['sc_name'] = '店铺分类name'
keyMap['sell_price'] = '销售价'
keyMap['sell_type'] = '销售类型'
keyMap['selling_points'] = '卖点'
keyMap['settle_mode'] = '结算模式'
keyMap['settle_price'] = '结算价格'
keyMap['settlement_period'] = '结算周期'
keyMap['sex'] = '性别'
keyMap['shipping_spache'] = '发货仓库'
keyMap['shop_item_attribute'] = '商品属性描述'
keyMap['shop_item_images'] = '商品图片'
keyMap['shop_item_price'] = '商品价格'
keyMap['shop_item_prices'] = '店铺商品价格'
keyMap['shop_item_stocks'] = '店铺商品库存列表'
keyMap['shop_items'] = '店铺商品详请'
keyMap['shop_items_dc_stocks'] = '分仓库存列表'
keyMap['shop_trades_packages'] = '交易单发货包裹列表'
keyMap['shop_trades_waybill'] = '交易单运单列表'
keyMap['short_name'] = '客户简称'
keyMap['should_quantity'] = '运单应收包裹数'
keyMap['sign_time'] = '签收时间'
keyMap['size'] = '开本'
keyMap['split_quantity'] = '拆单数量'
keyMap['status'] = '交易单状态'
keyMap['stock'] = '店铺库存'
keyMap['stock_type'] = '库存类型'
keyMap['stockout_option'] = '缺货处理方式'
keyMap['stockout_treatment'] = '云汉平台缺货处理方式'
keyMap['success'] = '结果'
keyMap['successed'] = '成功数量'
keyMap['telephone'] = '座机号码'
keyMap['title'] = '标题'
keyMap['total'] = '总数'
keyMap['total_pages'] = '总页数'
keyMap['total_quantity'] = '用户总数'
keyMap['total_rows'] = '总记录数'
keyMap['total_taxation'] = '国际税费'
keyMap['town'] = '乡镇码'
keyMap['town_name'] = '乡镇'
keyMap['trade_consignee'] = '收货人信息'
keyMap['trade_status'] = '交易单状态'
keyMap['type'] = '数据类型'
keyMap['update_time'] = '更新时间'
keyMap['use_time'] = '交易时间'
keyMap['usual'] = '是否常用'
keyMap['voucherno'] = '凭证'
keyMap['way_bill'] = '面单信息'
keyMap['waybill_no'] = '运单号'
keyMap['waybill_nos'] = '运单号列表'
keyMap['waybills'] = '运单列表'
keyMap['wechat'] = '联系人微信'
keyMap['winxuan_image_url'] = '图片URL'
keyMap['words_num'] = '字数'
keyMap['wx_order_id'] = 'wx订单号'
keyMap['wx_trade_id'] = '文轩交易单号'
keyMap['yunhan_director'] = '云汉负责人'
keyMap['zip_code'] = '邮政编码'
keyMap['zipcode'] = '邮编'

def getkeyMap():
    return keyMap

def getName(code):
    if code in keyMap.keys():
        return keyMap[code]
    else:
        return code

def transCodeToName(d):
    rst = None
    if isinstance(d, dict):
        rst = {}
        for k,v in d.items():
            if isinstance(v, dict):
                rst[getName(k)] = transCodeToName(v)
            elif isinstance(v, list):
                rst[getName(k)] = transCodeToName(v)
            else:
                rst[getName(k)] = v

    elif isinstance(d, list):
        rst = []
        for dd in d:
            rst.append(transCodeToName(dd))
    else:
        return d
    
    return rst